﻿<Window x:Class="Tdv.Wfrp.CharacterGenerator.Client.Views.Implementations.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c="clr-namespace:Tdv.Wfrp.CharacterGenerator.Client.Commands"
        xmlns:dxn="http://schemas.devexpress.com/winfx/2008/xaml/navbar"
        xmlns:serviceInterfaces="clr-namespace:Tdv.Wfrp.CharacterGenerator.Services.Interfaces.Navigation;assembly=Tdv.Wfrp.CharacterGenerator.Services.Interfaces"
        Title="Main Window" Height="400" Width="800">
    
    <Window.Resources>
        <!-- Allows a KeyBinding to be associated with a command defined in the View Model  -->
        <c:CommandReference x:Key="ExitCommandReference" Command="{Binding ExitCommand}" />
    </Window.Resources>
   
    <Window.InputBindings>
        <KeyBinding Key="X" Modifiers="Control" Command="{StaticResource ExitCommandReference}" /> 
    </Window.InputBindings>
    
    <DockPanel>
        <dxn:NavBarControl Name="navBar" DockPanel.Dock="Left" Width="200">
            <dxn:NavBarControl.Groups>
                <dxn:NavBarGroup Header="Management">
                        <Button Command="{Binding Path=NavigateCommand}" CommandParameter="{x:Static serviceInterfaces:NavigationTarget.CharacteristicView}" Content="Characteristics"/>
                </dxn:NavBarGroup>
                <dxn:NavBarGroup Header="Group 2" >
                        <Button Command="{Binding Path=ExitCommand}" Content="Exit"/>
                </dxn:NavBarGroup>
            </dxn:NavBarControl.Groups>
        </dxn:NavBarControl>
        <ContentControl Content="{Binding Path=DisplayedView}"/>
    </DockPanel>
</Window>
